package ruifeng.zcj.communcationring.ui.shopping;

import android.webkit.WebView;

import ruifeng.zcj.communcationring.base.WebViewFragment;
import ruifeng.zcj.communcationring.groble.FragmentArgs;
import ruifeng.zcj.communcationring.groble.Whole;
import ruifeng.zcj.communcationring.ui.reward.RewardActivity;

/**
 * 商城
 * Created by Administrator on 2016/8/26 0026.
 */
public class ShoppingFragment extends WebViewFragment {
    public static final String FILM_URL = "ShoppingFragment";

    @Override
    protected String LoadUrl() {
        return Whole.web_shopping;
    }

    // 切换到其他Fragment
    @Override
    protected void onUserInvisible() {
        mWebview.stopLoading();
    }

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        if (!url.equals(Whole.web_recruit)) {// 如果不等于学院
            FragmentArgs fragmentArgs = new FragmentArgs();
            fragmentArgs.add(FILM_URL, url);
            ShoppingActivity.launch(getBaseActivity(), ShoppingFragment.class, fragmentArgs);
        }
        return false;
    }
}
